package app.web;

import com.opensymphony.xwork2.ActionSupport;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;

import app.model.Product;
import app.model.ProductPackage;
import app.model.Tbluser;
import app.service.IProductService;
import app.service.IUserService;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;

@SuppressWarnings("serial")
public class ProductAction extends ActionSupport {
	private IProductService service;
	private Product p;
	private ProductPackage pp;

	public IProductService getService() {
		return service;
	}

	public void setService(IProductService service) {
		this.service = service;
	}

	public String addProduct() throws Exception {

		service.addNewPackage(pp);
		return SUCCESS;
	}
}
